Game đuổi chó sa mạc lập trình bằng ngôn ngữ c#
19.234 lượt xem;
1 using UnityEngine;
2 using System.Collections;
3
4 public class Resolution : MonoBehaviour {
5 public int width = 480;
6 public int height = 800;
7
8 void Start () {
9 #if UNITY_STANDALONE || UNITY_WEBPLAYER
10 //Application.targetFrameRate = 60;
11 if (Screen.width != width || Screen.height != height)
12 Screen.SetResolution(width, height, false);
13 #endif
14 Destroy(this);
15 }
16
17 }
2 using System.Collections;
3
4 public class Resolution : MonoBehaviour {
5 public int width = 480;
6 public int height = 800;
7
8 void Start () {
9 #if UNITY_STANDALONE || UNITY_WEBPLAYER
10 //Application.targetFrameRate = 60;
11 if (Screen.width != width || Screen.height != height)
12 Screen.SetResolution(width, height, false);
13 #endif
14 Destroy(this);
15 }
16
17 }
Application.targetFrameRate = 60;